#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
typedef int HeapDataType;
typedef struct Heap
{
	HeapDataType* p;
	int size;
	int capacity;
}Heap;
void HeapInit(Heap* heap);
void HeapDestroy(Heap* heap);
void HeapPush(Heap* heap, HeapDataType val);
void HeapPop(Heap* heap);
int HeapSize(Heap* heap);
bool HeapEmpty(Heap* heap);
void AdjustDown(HeapDataType* a, int parent,int n);
void AdjustUp(HeapDataType* a, int child);
int HeapTop(Heap* heap);